\\n\\n\\n\\n\\n
\\n
\\n
\\n
\\n
\\n\\\"LOGO\\\"\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n
\\n\\n
\\n
\\n\\n
\\n
\\n
\\n
\\n\\n粤ICP备19141659号\\n\\n MytStarTone搜索\\n\\n\\n
\\n
\\n\\n\\n\"], {type: 'application/javascript'})));var a=n.initialRegistrations;n.initialRegistrations=null,Promise.all(a).then(function(){return c.call(\"extensions\",\"onWorkerInit\",o)})}catch(e){c.call(\"extensions\",\"onWorkerInit\",o,e)}})}),this.extensions=[]}return function(e,t,n){t&&o(e.prototype,t),n&&o(e,n)}(e,[{key:\"register\",value:function(e){var t=this,n=this.nextExtensionId++;this.extensions.push(e);var r=\"extension.\".concat(this.workerId,\".\").concat(n),o=c.setService(r,e).then(function(){return c.call(\"extensions\",\"registerExtensionService\",r,t.extensionURL)});return this.initialRegistrations&&this.initialRegistrations.push(o),o}}]),e}();e.Scratch=e.Scratch||{},e.Scratch.ArgumentType=i,e.Scratch.BlockType=a,e.Scratch.TargetType=s;var l=new u;e.Scratch.extensions={register:l.register.bind(l)}}).call(this,n(4))},function(e,t){var n;n=function(){return this}();try{n=n||new Function(\"return this\")()}catch(e){\"object\"==typeof window&&(n=window)}e.exports=n},function(e,t){e.exports={ANGLE:\"angle\",BOOLEAN:\"Boolean\",COLOR:\"color\",NUMBER:\"number\",STRING:\"string\",MATRIX:\"matrix\",NOTE:\"note\",IMAGE:\"image\"}},function(e,t){e.exports={BOOLEAN:\"Boolean\",BUTTON:\"button\",COMMAND:\"command\",CONDITIONAL:\"conditional\",EVENT:\"event\",HAT:\"hat\",LOOP:\"loop\",REPORTER:\"reporter\"}},function(e,t,n){function r(e){\"@babel/helpers - typeof\";return(r=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function o(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n2?n-2:0),o=2;o3?a-3:0),s=3;s3?r-3:0),i=3;i4?i-4:0),c=4;c0&&\"function\"==typeof a[a.length-1].yield&&a.pop(),r?e.postMessage({service:t,method:n,responseId:s,args:a},r):e.postMessage({service:t,method:n,responseId:s,args:a})})}},{key:\"_storeCallbacks\",value:function(e,t){var n=this.nextResponseId++;return this.callbacks[n]=[e,t],n}},{key:\"_deliverResponse\",value:function(e,t){try{var n=o(this.callbacks[e],2),r=n[0],i=n[1];delete this.callbacks[e],t.error?i(t.error):r(t.result)}catch(e){s.error(\"Dispatch callback failed: \".concat(JSON.stringify(e)))}}},{key:\"_onMessage\",value:function(e,t){var n,o=t.data;o.args=o.args||[],o.service?n=\"dispatch\"===o.service?this._onDispatchMessage(e,o):this.call.apply(this,[o.service,o.method].concat(r(o.args))):void 0===o.responseId?s.error(\"Dispatch caught malformed message from a worker: \".concat(JSON.stringify(t))):this._deliverResponse(o.responseId,o),n&&(void 0===o.responseId?s.error(\"Dispatch message missing required response ID: \".concat(JSON.stringify(t))):n.then(function(t){return e.postMessage({responseId:o.responseId,result:t})},function(t){return e.postMessage({responseId:o.responseId,error:t})}))}},{key:\"_getServiceProvider\",value:function(e){throw new Error(\"Could not get provider for \".concat(e,\": _getServiceProvider not implemented\"))}},{key:\"_onDispatchMessage\",value:function(e,t){throw new Error(\"Unimplemented dispatch message handler cannot handle \".concat(t.method,\" method\"))}}]),e}();e.exports=u},function(e,t,n){var r=n(10),o=r.enable,i=r.disable,a=\"undefined\"!=typeof navigator&&/chrome/i.test(navigator.userAgent),c=n(13);if(r.defaultBackend=a?c.minilog:c,\"undefined\"!=typeof window){try{r.enable(JSON.parse(window.localStorage.minilogSettings))}catch(e){}if(window.location&&window.location.search){var s=RegExp(\"[?&]minilog=([^&]*)\").exec(window.location.search);s&&r.enable(decodeURIComponent(s[1]))}}r.enable=function(){o.call(r,!0);try{window.localStorage.minilogSettings=JSON.stringify(!0)}catch(e){}return this},r.disable=function(){i.call(r);try{delete window.localStorage.minilogSettings}catch(e){}return this},(e.exports=r).backends={array:n(16),browser:r.defaultBackend,localStorage:n(17),jQuery:n(18)}},function(e,t,n){var r=n(0),o=n(12),i=new r,a=Array.prototype.slice;(t=e.exports=function(e){var n=function(){return i.write(e,void 0,a.call(arguments)),n};return n.debug=function(){return i.write(e,\"debug\",a.call(arguments)),n},n.info=function(){return i.write(e,\"info\",a.call(arguments)),n},n.warn=function(){return i.write(e,\"warn\",a.call(arguments)),n},n.error=function(){return i.write(e,\"error\",a.call(arguments)),n},n.log=n.debug,n.suggest=t.suggest,n.format=i.format,n}).defaultBackend=t.defaultFormatter=null,t.pipe=function(e){return i.pipe(e)},t.end=t.unpipe=t.disable=function(e){return i.unpipe(e)},t.Transform=r,t.Filter=o,t.suggest=new o,t.enable=function(){return t.defaultFormatter?i.pipe(t.suggest).pipe(t.defaultFormatter).pipe(t.defaultBackend):i.pipe(t.suggest).pipe(t.defaultBackend)}},function(e,t){function n(){this._events={}}n.prototype={on:function(e,t){this._events||(this._events={});var n=this._events;return(n[e]||(n[e]=[])).push(t),this},removeListener:function(e,t){var n,r=this._events[e]||[];for(n=r.length-1;n>=0&&r[n];n--)r[n]!==t&&r[n].cb!==t||r.splice(n,1)},removeAllListeners:function(e){e?this._events[e]&&(this._events[e]=[]):this._events={}},listeners:function(e){return this._events&&this._events[e]||[]},emit:function(e){this._events||(this._events={});var t,n=Array.prototype.slice.call(arguments,1),r=this._events[e]||[];for(t=r.length-1;t>=0&&r[t];t--)r[t].apply(this,n);return this},when:function(e,t){return this.once(e,t,!0)},once:function(e,t,n){if(!t)return this;function r(){n||this.removeListener(e,r),t.apply(this,arguments)&&n&&this.removeListener(e,r)}return r.cb=t,this.on(e,r),this}},n.mixin=function(e){var t,r=n.prototype;for(t in r)r.hasOwnProperty(t)&&(e.prototype[t]=r[t])},e.exports=n},function(e,t,n){var r={debug:1,info:2,warn:3,error:4};function o(){this.enabled=!0,this.defaultResult=!0,this.clear()}function i(e,t){return e.n.test?e.n.test(t):e.n==t}n(0).mixin(o),o.prototype.allow=function(e,t){return this._white.push({n:e,l:r[t]}),this},o.prototype.deny=function(e,t){return this._black.push({n:e,l:r[t]}),this},o.prototype.clear=function(){return this._white=[],this._black=[],this},o.prototype.test=function(e,t){var n,o=Math.max(this._white.length,this._black.length);for(n=0;n=this._white[n].l)return!0;if(this._black[n]&&i(this._black[n],e)&&r[t]<=this._black[n].l)return!1}return this.defaultResult},o.prototype.write=function(e,t,n){if(!this.enabled||this.test(e,t))return this.emit(\"item\",e,t,n)},e.exports=o},function(e,t,n){var r=/\\n+$/,o=new(n(0));o.write=function(e,t,n){var o=n.length-1;if(\"undefined\"!=typeof console&&console.log){if(console.log.apply)return console.log.apply(console,[e,t].concat(n));if(JSON&&JSON.stringify){n[o]&&\"string\"==typeof n[o]&&(n[o]=n[o].replace(r,\"\"));try{for(o=0;o{this.loaded=!0,A&&A()});const g=this.toString(!0);B.src=`data:image/svg+xml;utf8,${encodeURIComponent(g)}`,this.loaded=!1}toString(A){return E(this._svgTag,A)}draw(A){if(!this.loaded)throw new Error("SVG image has not finished loading");this._drawFromImage(A)}_drawFromImage(A){if(null===this._cachedImage)return;const B=Number.isFinite(A)?A:1,g=this._measurements;this._canvas.width=g.width*B,this._canvas.height=g.height*B,this._canvas.width<=0||this._canvas.height<=0||this._cachedImage.naturalWidth<=0||this._cachedImage.naturalHeight<=0||(this._context.clearRect(0,0,this._canvas.width,this._canvas.height),this._context.setTransform(B,0,0,B,0,0),this._context.drawImage(this._cachedImage,0,0))}}},function(A,B,g){ /*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.2.2/LICENSE */ A.exports=function(){"use strict";var A=Object.hasOwnProperty,B=Object.setPrototypeOf,g=Object.isFrozen,Q=Object.getPrototypeOf,E=Object.getOwnPropertyDescriptor,C=Object.freeze,e=Object.seal,w=Object.create,t="undefined"!=typeof Reflect&&Reflect,n=t.apply,I=t.construct;n||(n=function(A,B,g){return A.apply(B,g)}),C||(C=function(A){return A}),e||(e=function(A){return A}),I||(I=function(A,B){return new(Function.prototype.bind.apply(A,[null].concat(function(A){if(Array.isArray(A)){for(var B=0,g=Array(A.length);B1?g-1:0),E=1;E/gm),p=e(/^data-[\-\w.\u00B7-\uFFFF]/),x=e(/^aria-[\-\w]+$/),z=e(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),K=e(/^(?:\w+script|data):/i),W=e(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A};function V(A){if(Array.isArray(A)){for(var B=0,g=Array(A.length);B0&&void 0!==arguments[0]?arguments[0]:b(),g=function(B){return A(B)};if(g.version="2.2.7",g.removed=[],!B||!B.document||9!==B.document.nodeType)return g.isSupported=!1,g;var Q=B.document,E=B.document,e=B.DocumentFragment,w=B.HTMLTemplateElement,t=B.Node,n=B.Element,I=B.NodeFilter,a=B.NamedNodeMap,v=void 0===a?B.NamedNodeMap||B.MozNamedAttrMap:a,O=B.Text,Z=B.Comment,X=B.DOMParser,q=B.trustedTypes,_=n.prototype,$=U(_,"cloneNode"),AA=U(_,"nextSibling"),BA=U(_,"childNodes"),gA=U(_,"parentNode");if("function"==typeof w){var QA=E.createElement("template");QA.content&&QA.content.ownerDocument&&(E=QA.content.ownerDocument)}var EA=P(q,Q),CA=EA&&SA?EA.createHTML(""):"",eA=E,wA=eA.implementation,tA=eA.createNodeIterator,nA=eA.getElementsByTagName,IA=eA.createDocumentFragment,iA=Q.importNode,cA={};try{cA=u(E).documentMode?E.documentMode:{}}catch(A){}var YA={};g.isSupported="function"==typeof gA&&wA&&void 0!==wA.createHTMLDocument&&9!==cA;var MA=T,oA=S,sA=p,lA=x,rA=K,DA=W,FA=z,aA=null,hA=h({},[].concat(V(G),V(N),V(m),V(R),V(d))),uA=null,UA=h({},[].concat(V(y),V(k),V(f),V(j))),GA=null,NA=null,mA=!0,JA=!0,RA=!1,HA=!1,dA=!1,yA=!1,kA=!1,fA=!1,jA=!1,TA=!0,SA=!1,pA=!0,xA=!0,zA=!1,KA={},WA=h({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),LA=null,VA=h({},["audio","video","img","source","image","track"]),bA=null,PA=h({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),vA=null,OA=E.createElement("form"),ZA=function(A){vA&&vA===A||(A&&"object"===(void 0===A?"undefined":L(A))||(A={}),A=u(A),aA="ALLOWED_TAGS"in A?h({},A.ALLOWED_TAGS):hA,uA="ALLOWED_ATTR"in A?h({},A.ALLOWED_ATTR):UA,bA="ADD_URI_SAFE_ATTR"in A?h(u(PA),A.ADD_URI_SAFE_ATTR):PA,LA="ADD_DATA_URI_TAGS"in A?h(u(VA),A.ADD_DATA_URI_TAGS):VA,GA="FORBID_TAGS"in A?h({},A.FORBID_TAGS):{},NA="FORBID_ATTR"in A?h({},A.FORBID_ATTR):{},KA="USE_PROFILES"in A&&A.USE_PROFILES,mA=!1!==A.ALLOW_ARIA_ATTR,JA=!1!==A.ALLOW_DATA_ATTR,RA=A.ALLOW_UNKNOWN_PROTOCOLS||!1,HA=A.SAFE_FOR_TEMPLATES||!1,dA=A.WHOLE_DOCUMENT||!1,fA=A.RETURN_DOM||!1,jA=A.RETURN_DOM_FRAGMENT||!1,TA=!1!==A.RETURN_DOM_IMPORT,SA=A.RETURN_TRUSTED_TYPE||!1,kA=A.FORCE_BODY||!1,pA=!1!==A.SANITIZE_DOM,xA=!1!==A.KEEP_CONTENT,zA=A.IN_PLACE||!1,FA=A.ALLOWED_URI_REGEXP||FA,HA&&(JA=!1),jA&&(fA=!0),KA&&(aA=h({},[].concat(V(d))),uA=[],!0===KA.html&&(h(aA,G),h(uA,y)),!0===KA.svg&&(h(aA,N),h(uA,k),h(uA,j)),!0===KA.svgFilters&&(h(aA,m),h(uA,k),h(uA,j)),!0===KA.mathMl&&(h(aA,R),h(uA,f),h(uA,j))),A.ADD_TAGS&&(aA===hA&&(aA=u(aA)),h(aA,A.ADD_TAGS)),A.ADD_ATTR&&(uA===UA&&(uA=u(uA)),h(uA,A.ADD_ATTR)),A.ADD_URI_SAFE_ATTR&&h(bA,A.ADD_URI_SAFE_ATTR),xA&&(aA["#text"]=!0),dA&&h(aA,["html","head","body"]),aA.table&&(h(aA,["tbody"]),delete GA.tbody),C&&C(A),vA=A)},XA=h({},["mi","mo","mn","ms","mtext"]),qA=h({},["foreignobject","desc","title","annotation-xml"]),_A=h({},N);h(_A,m),h(_A,J);var $A=h({},R);h($A,H);var AB="http://www.w3.org/1998/Math/MathML",BB="http://www.w3.org/2000/svg",gB="http://www.w3.org/1999/xhtml",QB=function(A){Y(g.removed,{element:A});try{A.parentNode.removeChild(A)}catch(B){try{A.outerHTML=CA}catch(B){A.remove()}}},EB=function(A,B){try{Y(g.removed,{attribute:B.getAttributeNode(A),from:B})}catch(A){Y(g.removed,{attribute:null,from:B})}if(B.removeAttribute(A),"is"===A&&!uA[A])if(fA||jA)try{QB(B)}catch(A){}else try{B.setAttribute(A,"")}catch(A){}},CB=function(A){var B=void 0,g=void 0;if(kA)A=""+A;else{var Q=o(A,/^[\r\n\t ]+/);g=Q&&Q[0]}var C=EA?EA.createHTML(A):A;try{B=(new X).parseFromString(C,"text/html")}catch(A){}if(!B||!B.documentElement){var e=B=wA.createHTMLDocument(""),w=e.body;w.parentNode.removeChild(w.parentNode.firstElementChild),w.outerHTML=C}return A&&g&&B.body.insertBefore(E.createTextNode(g),B.body.childNodes[0]||null),nA.call(B,dA?"html":"body")[0]},eB=function(A){return tA.call(A.ownerDocument||A,A,I.SHOW_ELEMENT|I.SHOW_COMMENT|I.SHOW_TEXT,function(){return I.FILTER_ACCEPT},!1)},wB=function(A){return"object"===(void 0===t?"undefined":L(t))?A instanceof t:A&&"object"===(void 0===A?"undefined":L(A))&&"number"==typeof A.nodeType&&"string"==typeof A.nodeName},tB=function(A,B,Q){YA[A]&&i(YA[A],function(A){A.call(g,B,Q,vA)})},nB=function(A){var B=void 0;if(tB("beforeSanitizeElements",A,null),function(A){return!(A instanceof O||A instanceof Z)&&!("string"==typeof A.nodeName&&"string"==typeof A.textContent&&"function"==typeof A.removeChild&&A.attributes instanceof v&&"function"==typeof A.removeAttribute&&"function"==typeof A.setAttribute&&"string"==typeof A.namespaceURI&&"function"==typeof A.insertBefore)}(A))return QB(A),!0;if(o(A.nodeName,/[\u0080-\uFFFF]/))return QB(A),!0;var Q=M(A.nodeName);if(tB("uponSanitizeElement",A,{tagName:Q,allowedTags:aA}),!wB(A.firstElementChild)&&(!wB(A.content)||!wB(A.content.firstElementChild))&&D(/<[/\w]/g,A.innerHTML)&&D(/<[/\w]/g,A.textContent))return QB(A),!0;if(!aA[Q]||GA[Q]){if(xA&&!WA[Q]){var E=gA(A),C=BA(A);if(C&&E)for(var e=C.length,w=e-1;w>=0;--w)E.insertBefore($(C[w],!0),AA(A))}return QB(A),!0}return A instanceof n&&!function(A){var B=gA(A);B&&B.tagName||(B={namespaceURI:gB,tagName:"template"});var g=M(A.tagName),Q=M(B.tagName);if(A.namespaceURI===BB)return B.namespaceURI===gB?"svg"===g:B.namespaceURI===AB?"svg"===g&&("annotation-xml"===Q||XA[Q]):Boolean(_A[g]);if(A.namespaceURI===AB)return B.namespaceURI===gB?"math"===g:B.namespaceURI===BB?"math"===g&&qA[Q]:Boolean($A[g]);if(A.namespaceURI===gB){if(B.namespaceURI===BB&&!qA[Q])return!1;if(B.namespaceURI===AB&&!XA[Q])return!1;var E=h({},["title","style","font","a","script"]);return!$A[g]&&(E[g]||!_A[g])}return!1}(A)?(QB(A),!0):"noscript"!==Q&&"noembed"!==Q||!D(/<\/no(script|embed)/i,A.innerHTML)?(HA&&3===A.nodeType&&(B=A.textContent,B=s(B,MA," "),B=s(B,oA," "),A.textContent!==B&&(Y(g.removed,{element:A.cloneNode()}),A.textContent=B)),tB("afterSanitizeElements",A,null),!1):(QB(A),!0)},IB=function(A,B,g){if(pA&&("id"===B||"name"===B)&&(g in E||g in OA))return!1;if(JA&&D(sA,B));else if(mA&&D(lA,B));else{if(!uA[B]||NA[B])return!1;if(bA[B]);else if(D(FA,s(g,DA,"")));else if("src"!==B&&"xlink:href"!==B&&"href"!==B||"script"===A||0!==l(g,"data:")||!LA[A])if(RA&&!D(rA,s(g,DA,"")));else if(g)return!1}return!0},iB=function(A){var B=void 0,Q=void 0,E=void 0,C=void 0;tB("beforeSanitizeAttributes",A,null);var e=A.attributes;if(e){var w={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:uA};for(C=e.length;C--;){var t=B=e[C],n=t.name,I=t.namespaceURI;if(Q=r(B.value),E=M(n),w.attrName=E,w.attrValue=Q,w.keepAttr=!0,w.forceKeepAttr=void 0,tB("uponSanitizeAttribute",A,w),Q=w.attrValue,!w.forceKeepAttr&&(EB(n,A),w.keepAttr))if(D(/\/>/i,Q))EB(n,A);else{HA&&(Q=s(Q,MA," "),Q=s(Q,oA," "));var i=A.nodeName.toLowerCase();if(IB(i,E,Q))try{I?A.setAttributeNS(I,n,Q):A.setAttribute(n,Q),c(g.removed)}catch(A){}}}tB("afterSanitizeAttributes",A,null)}},cB=function A(B){var g=void 0,Q=eB(B);for(tB("beforeSanitizeShadowDOM",B,null);g=Q.nextNode();)tB("uponSanitizeShadowNode",g,null),nB(g)||(g.content instanceof e&&A(g.content),iB(g));tB("afterSanitizeShadowDOM",B,null)};return g.sanitize=function(A,E){var C=void 0,w=void 0,n=void 0,I=void 0,i=void 0;if(A||(A="\x3c!--\x3e"),"string"!=typeof A&&!wB(A)){if("function"!=typeof A.toString)throw F("toString is not a function");if("string"!=typeof(A=A.toString()))throw F("dirty is not a string, aborting")}if(!g.isSupported){if("object"===L(B.toStaticHTML)||"function"==typeof B.toStaticHTML){if("string"==typeof A)return B.toStaticHTML(A);if(wB(A))return B.toStaticHTML(A.outerHTML)}return A}if(yA||ZA(E),g.removed=[],"string"==typeof A&&(zA=!1),zA);else if(A instanceof t)C=CB("\x3c!----\x3e"),1===(w=C.ownerDocument.importNode(A,!0)).nodeType&&"BODY"===w.nodeName?C=w:"HTML"===w.nodeName?C=w:C.appendChild(w);else{if(!fA&&!HA&&!dA&&-1===A.indexOf("<"))return EA&&SA?EA.createHTML(A):A;if(!(C=CB(A)))return fA?null:CA}C&&kA&&QB(C.firstChild);for(var c=eB(zA?A:C);n=c.nextNode();)3===n.nodeType&&n===I||nB(n)||(n.content instanceof e&&cB(n.content),iB(n),I=n);if(I=null,zA)return A;if(fA){if(jA)for(i=IA.call(C.ownerDocument);C.firstChild;)i.appendChild(C.firstChild);else i=C;return TA&&(i=iA.call(Q,i,!0)),i}var Y=dA?C.outerHTML:C.innerHTML;return HA&&(Y=s(Y,MA," "),Y=s(Y,oA," ")),EA&&SA?EA.createHTML(Y):Y},g.setConfig=function(A){ZA(A),yA=!0},g.clearConfig=function(){vA=null,yA=!1},g.isValidAttribute=function(A,B,g){vA||ZA({});var Q=M(A),E=M(B);return IB(Q,E,g)},g.addHook=function(A,B){"function"==typeof B&&(YA[A]=YA[A]||[],Y(YA[A],B))},g.removeHook=function(A){YA[A]&&c(YA[A])},g.removeHooks=function(A){YA[A]&&(YA[A]=[])},g.removeAllHooks=function(){YA={}},g}()}()},function(A,B){A.exports=function(A){const B=A.match(/]*>/);B&&-1===B[0].indexOf("xmlns=")&&(A=A.replace("]+?xlink:href=["'])data:img\/png/g,(A,B)=>`${B}data:image/png`));const g=/(<[^>]+?xmlns:(?!xml=)[^ ]+=)"http:\/\/www.w3.org\/XML\/1998\/namespace"/g;return null!==A.match(g)&&(A=A.replace(g,(A,B)=>`${B}"http://dummy.namespace"`)),A=(A=(A=A.replace(/<(\/?)\s*svg:/g,"<$1")).replace(/[\s\S]*<\/metadata>/,"")).replace(/[\s\S]*<\/script>/,"G. The B>G case\n\t// will be calculated in the negative and fed through abs() in the hue calculation at the end.\n\t// See also: https://en.wikipedia.org/wiki/HSL_and_HSV#Hue_and_chroma\n\tconst vec4 hueOffsets = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\n\n\t// temp1.xy = sort B & G (largest first)\n\t// temp1.z = the hue offset we\'ll use if it turns out that R is the largest component (M==R)\n\t// temp1.w = the hue offset we\'ll use if it turns out that R is not the largest component (M==G or M==B)\n\tvec4 temp1 = rgb.b > rgb.g ? vec4(rgb.bg, hueOffsets.wz) : vec4(rgb.gb, hueOffsets.xy);\n\n\t// temp2.x = the largest component of RGB ("M" / "Max")\n\t// temp2.yw = the smaller components of RGB, ordered for the hue calculation (not necessarily sorted by magnitude!)\n\t// temp2.z = the hue offset we\'ll use in the hue calculation\n\tvec4 temp2 = rgb.r > temp1.x ? vec4(rgb.r, temp1.yzx) : vec4(temp1.xyw, rgb.r);\n\n\t// m = the smallest component of RGB ("min")\n\tfloat m = min(temp2.y, temp2.w);\n\n\t// Chroma = M - m\n\tfloat C = temp2.x - m;\n\n\t// Value = M\n\tfloat V = temp2.x;\n\n\treturn vec3(\n\t\tabs(temp2.z + (temp2.w - temp2.y) / (6.0 * C + epsilon)), // Hue\n\t\tC / (temp2.x + epsilon), // Saturation\n\t\tV); // Value\n}\n\nvec3 convertHue2RGB(float hue)\n{\n\tfloat r = abs(hue * 6.0 - 3.0) - 1.0;\n\tfloat g = 2.0 - abs(hue * 6.0 - 2.0);\n\tfloat b = 2.0 - abs(hue * 6.0 - 4.0);\n\treturn clamp(vec3(r, g, b), 0.0, 1.0);\n}\n\nvec3 convertHSV2RGB(vec3 hsv)\n{\n\tvec3 rgb = convertHue2RGB(hsv.x);\n\tfloat c = hsv.z * hsv.y;\n\treturn rgb * c + hsv.z - c;\n}\n#endif // !defined(DRAW_MODE_silhouette) && (defined(ENABLE_color))\n\nconst vec2 kCenter = vec2(0.5, 0.5);\n\nvoid main()\n{\n\t#if !(defined(DRAW_MODE_line) || defined(DRAW_MODE_background))\n\tvec2 texcoord0 = v_texCoord;\n\n\t#ifdef ENABLE_mosaic\n\ttexcoord0 = fract(u_mosaic * texcoord0);\n\t#endif // ENABLE_mosaic\n\n\t#ifdef ENABLE_pixelate\n\t{\n\t\t// TODO: clean up "pixel" edges\n\t\tvec2 pixelTexelSize = u_skinSize / u_pixelate;\n\t\ttexcoord0 = (floor(texcoord0 * pixelTexelSize) + kCenter) / pixelTexelSize;\n\t}\n\t#endif // ENABLE_pixelate\n\n\t#ifdef ENABLE_whirl\n\t{\n\t\tconst float kRadius = 0.5;\n\t\tvec2 offset = texcoord0 - kCenter;\n\t\tfloat offsetMagnitude = length(offset);\n\t\tfloat whirlFactor = max(1.0 - (offsetMagnitude / kRadius), 0.0);\n\t\tfloat whirlActual = u_whirl * whirlFactor * whirlFactor;\n\t\tfloat sinWhirl = sin(whirlActual);\n\t\tfloat cosWhirl = cos(whirlActual);\n\t\tmat2 rotationMatrix = mat2(\n\t\t\tcosWhirl, -sinWhirl,\n\t\t\tsinWhirl, cosWhirl\n\t\t);\n\n\t\ttexcoord0 = rotationMatrix * offset + kCenter;\n\t}\n\t#endif // ENABLE_whirl\n\n\t#ifdef ENABLE_fisheye\n\t{\n\t\tvec2 vec = (texcoord0 - kCenter) / kCenter;\n\t\tfloat vecLength = length(vec);\n\t\tfloat r = pow(min(vecLength, 1.0), u_fisheye) * max(1.0, vecLength);\n\t\tvec2 unit = vec / vecLength;\n\n\t\ttexcoord0 = kCenter + r * unit * kCenter;\n\t}\n\t#endif // ENABLE_fisheye\n\n\tgl_FragColor = texture2D(u_skin, texcoord0);\n\n\t#if defined(ENABLE_color) || defined(ENABLE_brightness)\n\t// Divide premultiplied alpha values for proper color processing\n\t// Add epsilon to avoid dividing by 0 for fully transparent pixels\n\tgl_FragColor.rgb = clamp(gl_FragColor.rgb / (gl_FragColor.a + epsilon), 0.0, 1.0);\n\n\t#ifdef ENABLE_color\n\t{\n\t\tvec3 hsv = convertRGB2HSV(gl_FragColor.xyz);\n\n\t\t// this code forces grayscale values to be slightly saturated\n\t\t// so that some slight change of hue will be visible\n\t\tconst float minLightness = 0.11 / 2.0;\n\t\tconst float minSaturation = 0.09;\n\t\tif (hsv.z < minLightness) hsv = vec3(0.0, 1.0, minLightness);\n\t\telse if (hsv.y < minSaturation) hsv = vec3(0.0, minSaturation, hsv.z);\n\n\t\thsv.x = mod(hsv.x + u_color, 1.0);\n\t\tif (hsv.x < 0.0) hsv.x += 1.0;\n\n\t\tgl_FragColor.rgb = convertHSV2RGB(hsv);\n\t}\n\t#endif // ENABLE_color\n\n\t#ifdef ENABLE_brightness\n\tgl_FragColor.rgb = clamp(gl_FragColor.rgb + vec3(u_brightness), vec3(0), vec3(1));\n\t#endif // ENABLE_brightness\n\n\t// Re-multiply color values\n\tgl_FragColor.rgb *= gl_FragColor.a + epsilon;\n\n\t#endif // defined(ENABLE_color) || defined(ENABLE_brightness)\n\n\t#ifdef ENABLE_ghost\n\tgl_FragColor *= u_ghost;\n\t#endif // ENABLE_ghost\n\n\t#ifdef DRAW_MODE_silhouette\n\t// Discard fully transparent pixels for stencil test\n\tif (gl_FragColor.a == 0.0) {\n\t\tdiscard;\n\t}\n\t// switch to u_silhouetteColor only AFTER the alpha test\n\tgl_FragColor = u_silhouetteColor;\n\t#else // DRAW_MODE_silhouette\n\n\t#ifdef DRAW_MODE_colorMask\n\tvec3 maskDistance = abs(gl_FragColor.rgb - u_colorMask);\n\tvec3 colorMaskTolerance = vec3(u_colorMaskTolerance, u_colorMaskTolerance, u_colorMaskTolerance);\n\tif (any(greaterThan(maskDistance, colorMaskTolerance)))\n\t{\n\t\tdiscard;\n\t}\n\t#endif // DRAW_MODE_colorMask\n\t#endif // DRAW_MODE_silhouette\n\n\t#ifdef DRAW_MODE_straightAlpha\n\t// Un-premultiply alpha.\n\tgl_FragColor.rgb /= gl_FragColor.a + epsilon;\n\t#endif\n\n\t#endif // !(defined(DRAW_MODE_line) || defined(DRAW_MODE_background))\n\n\t#ifdef DRAW_MODE_line\n\t// Maaaaagic antialiased-line-with-round-caps shader.\n\n\t// "along-the-lineness". This increases parallel to the line.\n\t// It goes from negative before the start point, to 0.5 through the start to the end, then ramps up again\n\t// past the end point.\n\tfloat d = ((v_texCoord.x - clamp(v_texCoord.x, 0.0, u_lineLength)) * 0.5) + 0.5;\n\n\t// Distance from (0.5, 0.5) to (d, the perpendicular coordinate). When we\'re in the middle of the line,\n\t// d will be 0.5, so the distance will be 0 at points close to the line and will grow at points further from it.\n\t// For the "caps", d will ramp down/up, giving us rounding.\n\t// See https://www.youtube.com/watch?v=PMltMdi1Wzg for a rough outline of the technique used to round the lines.\n\tfloat line = distance(vec2(0.5), vec2(d, v_texCoord.y)) * 2.0;\n\t// Expand out the line by its thickness.\n\tline -= ((u_lineThickness - 1.0) * 0.5);\n\t// Because "distance to the center of the line" decreases the closer we get to the line, but we want more opacity\n\t// the closer we are to the line, invert it.\n\tgl_FragColor = u_lineColor * clamp(1.0 - line, 0.0, 1.0);\n\t#endif // DRAW_MODE_line\n\n\t#ifdef DRAW_MODE_background\n\tgl_FragColor = u_backgroundColor;\n\t#endif\n}\n'},function(A,B){A.exports={rgbToHsv:([A,B,g],Q)=>{let E=0;A/=255;let C=0;(B/=255)<(g/=255)&&(C=B,B=g,g=C,E=-1),A{if(0===B)return Q[0]=Q[1]=Q[2]=255*g+.5,Q;const E=6*(A%=1)|0,C=6*A-E,e=g*(1-B),w=g*(1-B*C),t=g*(1-B*(1-C));let n=0,I=0,i=0;switch(E){case 0:n=g,I=t,i=e;break;case 1:n=w,I=g,i=e;break;case 2:n=e,I=g,i=t;break;case 3:n=e,I=w,i=g;break;case 4:n=t,I=e,i=g;break;case 5:n=g,I=e,i=w}return Q[0]=255*n+.5,Q[1]=255*I+.5,Q[2]=255*i+.5,Q}}},function(A,B,g){const Q=g(16),E=g(52),C=g(40),e=g(41),w={color4f:[0,0,1,1],diameter:1},t=[0,0,0,0];A.exports=class extends C{constructor(A,B){super(A),this._renderer=B,this._size=null,this._framebuffer=null,this._silhouetteDirty=!1,this._silhouettePixels=null,this._silhouetteImageData=null,this._lineOnBufferDrawRegionId={enter:()=>this._enterDrawLineOnBuffer(),exit:()=>this._exitDrawLineOnBuffer()},this._usePenBufferDrawRegionId={enter:()=>this._enterUsePenBuffer(),exit:()=>this._exitUsePenBuffer()},this._lineBufferInfo=Q.createBufferInfoFromArrays(this._renderer.gl,{a_position:{numComponents:2,data:[1,0,0,0,1,1,1,1,0,0,0,1]}}),this._lineShader=this._renderer._shaderManager.getShader(e.DRAW_MODE.line,0),this.onNativeSizeChanged=this.onNativeSizeChanged.bind(this),this._renderer.on(E.Events.NativeSizeChanged,this.onNativeSizeChanged),this._setCanvasSize(B.getNativeSize())}dispose(){this._renderer.removeListener(E.Events.NativeSizeChanged,this.onNativeSizeChanged),this._renderer.gl.deleteTexture(this._texture),this._texture=null,super.dispose()}get size(){return this._size}useNearest(A){return Math.max(A[0],A[1])>=100}getTexture(A){return this._texture}clear(){this._renderer.enterDrawRegion(this._usePenBufferDrawRegionId);const A=this._renderer.gl;A.clearColor(0,0,0,0),A.clear(A.COLOR_BUFFER_BIT),this._silhouetteDirty=!0}drawPoint(A,B,g){this.drawLine(A,B,g,B,g)}drawLine(A,B,g,Q,E){const C=A.diameter||w.diameter,e=1===C||3===C?.5:0;this._drawLineOnBuffer(A,B+e,g+e,Q+e,E+e),this._silhouetteDirty=!0}_enterDrawLineOnBuffer(){const A=this._renderer.gl;Q.bindFramebufferInfo(A,this._framebuffer),A.viewport(0,0,this._size[0],this._size[1]);const B=this._lineShader;A.useProgram(B.program),Q.setBuffersAndAttributes(A,B,this._lineBufferInfo);const g={u_skin:this._texture,u_stageSize:this._size};Q.setUniforms(B,g)}_exitDrawLineOnBuffer(){const A=this._renderer.gl;Q.bindFramebufferInfo(A,null)}_enterUsePenBuffer(){Q.bindFramebufferInfo(this._renderer.gl,this._framebuffer)}_exitUsePenBuffer(){Q.bindFramebufferInfo(this._renderer.gl,null)}_drawLineOnBuffer(A,B,g,E,C){const e=this._renderer.gl,n=this._lineShader;this._renderer.enterDrawRegion(this._lineOnBufferDrawRegionId);const I=A.color4f||w.color4f;t[0]=I[0]*I[3],t[1]=I[1]*I[3],t[2]=I[2]*I[3],t[3]=I[3];const i=E-B,c=C-g,Y=Math.sqrt(i*i+c*c),M={u_lineColor:t,u_lineThickness:A.diameter||w.diameter,u_lineLength:Y,u_penPoints:[B,-g,i,-c]};Q.setUniforms(n,M),Q.drawBufferInfo(e,this._lineBufferInfo,e.TRIANGLES),this._silhouetteDirty=!0}onNativeSizeChanged(A){this._setCanvasSize(A.newSize)}_setCanvasSize(A){const[B,g]=A;this._size=A,this._rotationCenter[0]=B/2,this._rotationCenter[1]=g/2;const E=this._renderer.gl;this._texture=Q.createTexture(E,{mag:E.NEAREST,min:E.NEAREST,wrap:E.CLAMP_TO_EDGE,width:B,height:g});const C=[{format:E.RGBA,attachment:this._texture}];this._framebuffer?Q.resizeFramebufferInfo(E,this._framebuffer,C,B,g):this._framebuffer=Q.createFramebufferInfo(E,C,B,g),E.clearColor(0,0,0,0),E.clear(E.COLOR_BUFFER_BIT),this._silhouettePixels=new Uint8Array(Math.floor(B*g*4)),this._silhouetteImageData=new ImageData(B,g),this._silhouetteDirty=!0}updateSilhouette(){if(this._silhouetteDirty){this._renderer.enterDrawRegion(this._usePenBufferDrawRegionId);const A=this._renderer.gl;A.readPixels(0,0,this._size[0],this._size[1],A.RGBA,A.UNSIGNED_BYTE,this._silhouettePixels),this._silhouetteImageData.data.set(this._silhouettePixels),this._silhouette.update(this._silhouetteImageData,!0),this._silhouetteDirty=!1}}}},function(A,B,g){const Q=g(16),E=g(40),C=g(475).SVGRenderer,e=g(41),w=2048,t=8;A.exports=class extends E{constructor(A,B){super(A),this._renderer=B,this._svgRenderer=new C,this._scaledMIPs=[],this._largestMIPScale=0,this._maxTextureScale=1}dispose(){this.resetMIPs(),super.dispose()}get size(){return this._svgRenderer.size}useNearest(A,B){return 0==(B.enabledEffects&(e.EFFECT_INFO.fisheye.mask|e.EFFECT_INFO.whirl.mask|e.EFFECT_INFO.pixelate.mask|e.EFFECT_INFO.mosaic.mask))&&B._direction%90==0&&Math.abs(A[0])>99&&Math.abs(A[0])<101&&Math.abs(A[1])>99&&Math.abs(A[1])<101}createMIP(A){this._svgRenderer.draw(A);const B=this._svgRenderer.canvas;if(0===B.width||0===B.height)return super.getTexture();const g=B.getContext("2d").getImageData(0,0,B.width,B.height),E={auto:!1,wrap:this._renderer.gl.CLAMP_TO_EDGE,src:g,premultiplyAlpha:!0},C=Q.createTexture(this._renderer.gl,E);return this._largestMIPScalethis._renderer.gl.deleteTexture(A)),this._scaledMIPs.length=0,this._largestMIPScale=0}setSVG(A,B){this._svgRenderer.loadSVG(A,!1,()=>{const A=this._svgRenderer.size;if(0===A[0]||0===A[1])return void super.setEmptyImageData();const g=Math.ceil(Math.max(this.size[0],this.size[1]));let Q=2;for(;g*Q<=w;Q*=2)this._maxTextureScale=Q;this.resetMIPs(),void 0===B&&(B=this.calculateRotationCenter());const C=this._svgRenderer.viewOffset;this._rotationCenter[0]=B[0]-C[0],this._rotationCenter[1]=B[1]-C[1],this.emit(E.Events.WasAltered)})}}},function(A,B,g){const Q=g(476),E=g(490),C=g(158),e=g(155),w=g(157),t=g(76),n=g(156);A.exports={BitmapAdapter:E,convertFonts:n,inlineSvgFonts:C,loadSvgString:e,serializeSvgToString:w,SvgElement:t,SVGRenderer:Q}},function(A,B,g){const Q=g(155),E=g(157);A.exports=class{constructor(A){this._canvas=A||document.createElement("canvas"),this._context=this._canvas.getContext("2d"),this._measurements={x:0,y:0,width:0,height:0},this._cachedImage=null,this.loaded=!1}get canvas(){return this._canvas}get size(){return[this._measurements.width,this._measurements.height]}get viewOffset(){return[this._measurements.x,this._measurements.y]}loadString(A,B){this._cachedImage=null;const g=Q(A,B);this._svgTag=g,this._measurements={width:g.viewBox.baseVal.width,height:g.viewBox.baseVal.height,x:g.viewBox.baseVal.x,y:g.viewBox.baseVal.y}}loadSVG(A,B,g){this.loadString(A,B),this._createSVGImage(g)}_createSVGImage(A){null===this._cachedImage&&(this._cachedImage=new Image);const B=this._cachedImage;B.onload=(()=>{this.loaded=!0,A&&A()});const g=this.toString(!0);B.src=`data:image/svg+xml;utf8,${encodeURIComponent(g)}`,this.loaded=!1}toString(A){return E(this._svgTag,A)}draw(A){if(!this.loaded)throw new Error("SVG image has not finished loading");this._drawFromImage(A)}_drawFromImage(A){if(null===this._cachedImage)return;const B=Number.isFinite(A)?A:1,g=this._measurements;this._canvas.width=g.width*B,this._canvas.height=g.height*B,this._canvas.width<=0||this._canvas.height<=0||this._cachedImage.naturalWidth<=0||this._cachedImage.naturalHeight<=0||(this._context.clearRect(0,0,this._canvas.width,this._canvas.height),this._context.setTransform(B,0,0,B,0,0),this._context.drawImage(this._cachedImage,0,0))}}},function(A,B,g){ /*! @license DOMPurify | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.0.8/LICENSE */ A.exports=function(){"use strict";var A=Object.hasOwnProperty,B=Object.setPrototypeOf,g=Object.isFrozen,Q=Object.freeze,E=Object.seal,C=Object.create,e="undefined"!=typeof Reflect&&Reflect,w=e.apply,t=e.construct;w||(w=function(A,B,g){return A.apply(B,g)}),Q||(Q=function(A){return A}),E||(E=function(A){return A}),t||(t=function(A,B){return new(Function.prototype.bind.apply(A,[null].concat(function(A){if(Array.isArray(A)){for(var B=0,g=Array(A.length);B1?g-1:0),E=1;E/gm),k=E(/^data-[\-\w.\u00B7-\uFFFF]/),f=E(/^aria-[\-\w]+$/),j=E(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),T=E(/^(?:\w+script|data):/i),S=E(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(A){return typeof A}:function(A){return A&&"function"==typeof Symbol&&A.constructor===Symbol&&A!==Symbol.prototype?"symbol":typeof A};function x(A){if(Array.isArray(A)){for(var B=0,g=Array(A.length);B0&&void 0!==arguments[0]?arguments[0]:z(),g=function(B){return A(B)};if(g.version="2.1.1",g.removed=[],!B||!B.document||9!==B.document.nodeType)return g.isSupported=!1,g;var E=B.document,C=B.document,e=B.DocumentFragment,w=B.HTMLTemplateElement,t=B.Node,D=B.NodeFilter,W=B.NamedNodeMap,L=void 0===W?B.NamedNodeMap||B.MozNamedAttrMap:W,V=B.Text,b=B.Comment,P=B.DOMParser,v=B.trustedTypes;if("function"==typeof w){var O=C.createElement("template");O.content&&O.content.ownerDocument&&(C=O.content.ownerDocument)}var Z=K(v,E),X=Z&&JA?Z.createHTML(""):"",q=C,_=q.implementation,$=q.createNodeIterator,AA=q.getElementsByTagName,BA=q.createDocumentFragment,gA=E.importNode,QA={};try{QA=a(C).documentMode?C.documentMode:{}}catch(A){}var EA={};g.isSupported=_&&void 0!==_.createHTMLDocument&&9!==QA;var CA=d,eA=y,wA=k,tA=f,nA=T,IA=S,iA=j,cA=null,YA=F({},[].concat(x(h),x(u),x(U),x(G),x(N))),MA=null,oA=F({},[].concat(x(m),x(J),x(R),x(H))),sA=null,lA=null,rA=!0,DA=!0,FA=!1,aA=!1,hA=!1,uA=!1,UA=!1,GA=!1,NA=!1,mA=!1,JA=!1,RA=!0,HA=!0,dA=!1,yA={},kA=F({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","plaintext","script","style","svg","template","thead","title","video","xmp"]),fA=null,jA=F({},["audio","video","img","source","image","track"]),TA=null,SA=F({},["alt","class","for","id","label","name","pattern","placeholder","summary","title","value","style","xmlns"]),pA=null,xA=C.createElement("form"),zA=function(A){pA&&pA===A||(A&&"object"===(void 0===A?"undefined":p(A))||(A={}),A=a(A),cA="ALLOWED_TAGS"in A?F({},A.ALLOWED_TAGS):YA,MA="ALLOWED_ATTR"in A?F({},A.ALLOWED_ATTR):oA,TA="ADD_URI_SAFE_ATTR"in A?F(a(SA),A.ADD_URI_SAFE_ATTR):SA,fA="ADD_DATA_URI_TAGS"in A?F(a(jA),A.ADD_DATA_URI_TAGS):jA,sA="FORBID_TAGS"in A?F({},A.FORBID_TAGS):{},lA="FORBID_ATTR"in A?F({},A.FORBID_ATTR):{},yA="USE_PROFILES"in A&&A.USE_PROFILES,rA=!1!==A.ALLOW_ARIA_ATTR,DA=!1!==A.ALLOW_DATA_ATTR,FA=A.ALLOW_UNKNOWN_PROTOCOLS||!1,aA=A.SAFE_FOR_TEMPLATES||!1,hA=A.WHOLE_DOCUMENT||!1,GA=A.RETURN_DOM||!1,NA=A.RETURN_DOM_FRAGMENT||!1,mA=A.RETURN_DOM_IMPORT||!1,JA=A.RETURN_TRUSTED_TYPE||!1,UA=A.FORCE_BODY||!1,RA=!1!==A.SANITIZE_DOM,HA=!1!==A.KEEP_CONTENT,dA=A.IN_PLACE||!1,iA=A.ALLOWED_URI_REGEXP||iA,aA&&(DA=!1),NA&&(GA=!0),yA&&(cA=F({},[].concat(x(N))),MA=[],!0===yA.html&&(F(cA,h),F(MA,m)),!0===yA.svg&&(F(cA,u),F(MA,J),F(MA,H)),!0===yA.svgFilters&&(F(cA,U),F(MA,J),F(MA,H)),!0===yA.mathMl&&(F(cA,G),F(MA,R),F(MA,H))),A.ADD_TAGS&&(cA===YA&&(cA=a(cA)),F(cA,A.ADD_TAGS)),A.ADD_ATTR&&(MA===oA&&(MA=a(MA)),F(MA,A.ADD_ATTR)),A.ADD_URI_SAFE_ATTR&&F(TA,A.ADD_URI_SAFE_ATTR),HA&&(cA["#text"]=!0),hA&&F(cA,["html","head","body"]),cA.table&&(F(cA,["tbody"]),delete sA.tbody),Q&&Q(A),pA=A)},KA=function(A){i(g.removed,{element:A});try{A.parentNode.removeChild(A)}catch(B){A.outerHTML=X}},WA=function(A,B){try{i(g.removed,{attribute:B.getAttributeNode(A),from:B})}catch(A){i(g.removed,{attribute:null,from:B})}B.removeAttribute(A)},LA=function(A){var B=void 0,g=void 0;if(UA)A=""+A;else{var Q=Y(A,/^[\r\n\t ]+/);g=Q&&Q[0]}var E=Z?Z.createHTML(A):A;try{B=(new P).parseFromString(E,"text/html")}catch(A){}if(!B||!B.documentElement){var e=B=_.createHTMLDocument(""),w=e.body;w.parentNode.removeChild(w.parentNode.firstElementChild),w.outerHTML=E}return A&&g&&B.body.insertBefore(C.createTextNode(g),B.body.childNodes[0]||null),AA.call(B,hA?"html":"body")[0]},VA=function(A){return $.call(A.ownerDocument||A,A,D.SHOW_ELEMENT|D.SHOW_COMMENT|D.SHOW_TEXT,function(){return D.FILTER_ACCEPT},!1)},bA=function(A){return"object"===(void 0===t?"undefined":p(t))?A instanceof t:A&&"object"===(void 0===A?"undefined":p(A))&&"number"==typeof A.nodeType&&"string"==typeof A.nodeName},PA=function(A,B,Q){EA[A]&&n(EA[A],function(A){A.call(g,B,Q,pA)})},vA=function(A){var B=void 0;if(PA("beforeSanitizeElements",A,null),function(A){return!(A instanceof V||A instanceof b)&&!("string"==typeof A.nodeName&&"string"==typeof A.textContent&&"function"==typeof A.removeChild&&A.attributes instanceof L&&"function"==typeof A.removeAttribute&&"function"==typeof A.setAttribute&&"string"==typeof A.namespaceURI)}(A))return KA(A),!0;if(Y(A.nodeName,/[\u0080-\uFFFF]/))return KA(A),!0;var Q=c(A.nodeName);if(PA("uponSanitizeElement",A,{tagName:Q,allowedTags:cA}),("svg"===Q||"math"===Q)&&0!==A.querySelectorAll("p, br").length)return KA(A),!0;if(!bA(A.firstElementChild)&&(!bA(A.content)||!bA(A.content.firstElementChild))&&l(/<[!/\w]/g,A.innerHTML)&&l(/<[!/\w]/g,A.textContent))return KA(A),!0;if(!cA[Q]||sA[Q]){if(HA&&!kA[Q]&&"function"==typeof A.insertAdjacentHTML)try{var E=A.innerHTML;A.insertAdjacentHTML("AfterEnd",Z?Z.createHTML(E):E)}catch(A){}return KA(A),!0}return"noscript"!==Q&&"noembed"!==Q||!l(/<\/no(script|embed)/i,A.innerHTML)?(aA&&3===A.nodeType&&(B=A.textContent,B=M(B,CA," "),B=M(B,eA," "),A.textContent!==B&&(i(g.removed,{element:A.cloneNode()}),A.textContent=B)),PA("afterSanitizeElements",A,null),!1):(KA(A),!0)},OA=function(A,B,g){if(RA&&("id"===B||"name"===B)&&(g in C||g in xA))return!1;if(DA&&l(wA,B));else if(rA&&l(tA,B));else{if(!MA[B]||lA[B])return!1;if(TA[B]);else if(l(iA,M(g,IA,"")));else if("src"!==B&&"xlink:href"!==B&&"href"!==B||"script"===A||0!==o(g,"data:")||!fA[A])if(FA&&!l(nA,M(g,IA,"")));else if(g)return!1}return!0},ZA=function(A){var B=void 0,Q=void 0,E=void 0,C=void 0;PA("beforeSanitizeAttributes",A,null);var e=A.attributes;if(e){var w={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:MA};for(C=e.length;C--;){var t=B=e[C],n=t.name,i=t.namespaceURI;if(Q=s(B.value),E=c(n),w.attrName=E,w.attrValue=Q,w.keepAttr=!0,w.forceKeepAttr=void 0,PA("uponSanitizeAttribute",A,w),Q=w.attrValue,!w.forceKeepAttr&&(WA(n,A),w.keepAttr))if(l(/\/>/i,Q))WA(n,A);else{aA&&(Q=M(Q,CA," "),Q=M(Q,eA," "));var Y=A.nodeName.toLowerCase();if(OA(Y,E,Q))try{i?A.setAttributeNS(i,n,Q):A.setAttribute(n,Q),I(g.removed)}catch(A){}}}PA("afterSanitizeAttributes",A,null)}},XA=function A(B){var g=void 0,Q=VA(B);for(PA("beforeSanitizeShadowDOM",B,null);g=Q.nextNode();)PA("uponSanitizeShadowNode",g,null),vA(g)||(g.content instanceof e&&A(g.content),ZA(g));PA("afterSanitizeShadowDOM",B,null)};return g.sanitize=function(A,Q){var C=void 0,w=void 0,n=void 0,I=void 0,i=void 0;if(A||(A="\x3c!--\x3e"),"string"!=typeof A&&!bA(A)){if("function"!=typeof A.toString)throw r("toString is not a function");if("string"!=typeof(A=A.toString()))throw r("dirty is not a string, aborting")}if(!g.isSupported){if("object"===p(B.toStaticHTML)||"function"==typeof B.toStaticHTML){if("string"==typeof A)return B.toStaticHTML(A);if(bA(A))return B.toStaticHTML(A.outerHTML)}return A}if(uA||zA(Q),g.removed=[],"string"==typeof A&&(dA=!1),dA);else if(A instanceof t)C=LA("\x3c!----\x3e"),1===(w=C.ownerDocument.importNode(A,!0)).nodeType&&"BODY"===w.nodeName?C=w:"HTML"===w.nodeName?C=w:C.appendChild(w);else{if(!GA&&!aA&&!hA&&-1===A.indexOf("<"))return Z&&JA?Z.createHTML(A):A;if(!(C=LA(A)))return GA?null:X}C&&UA&&KA(C.firstChild);for(var c=VA(dA?A:C);n=c.nextNode();)3===n.nodeType&&n===I||vA(n)||(n.content instanceof e&&XA(n.content),ZA(n),I=n);if(I=null,dA)return A;if(GA){if(NA)for(i=BA.call(C.ownerDocument);C.firstChild;)i.appendChild(C.firstChild);else i=C;return mA&&(i=gA.call(E,i,!0)),i}var Y=hA?C.outerHTML:C.innerHTML;return aA&&(Y=M(Y,CA," "),Y=M(Y,eA," ")),Z&&JA?Z.createHTML(Y):Y},g.setConfig=function(A){zA(A),uA=!0},g.clearConfig=function(){pA=null,uA=!1},g.isValidAttribute=function(A,B,g){pA||zA({});var Q=c(A),E=c(B);return OA(Q,E,g)},g.addHook=function(A,B){"function"==typeof B&&(EA[A]=EA[A]||[],i(EA[A],B))},g.removeHook=function(A){EA[A]&&I(EA[A])},g.removeHooks=function(A){EA[A]&&(EA[A]=[])},g.removeAllHooks=function(){EA={}},g}()}()},function(A,B){A.exports=function(A){const B=A.match(/]*>/);B&&-1===B[0].indexOf("xmlns=")&&(A=A.replace("]+?xlink:href=["'])data:img\/png/g,(A,B)=>`${B}data:image/png`));const g=/(<[^>]+?xmlns:(?!xml=)[^ ]+=)"http:\/\/www.w3.org\/XML\/1998\/namespace"/g;return null!==A.match(g)&&(A=A.replace(g,(A,B)=>`${B}"http://dummy.namespace"`)),A=(A=(A=A.replace(/<(\/?)\s*svg:/g,"<$1")).replace(/[\s\S]*<\/metadata>/,"")).replace(/[\s\S]*<\/script>/,"